<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The RecursiveCachingIterator class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="recursivearrayiterator.haschildren.html">« RecursiveArrayIterator::hasChildren</a></li>
      <li style="float: right;"><a href="recursivecachingiterator.construct.html">RecursiveCachingIterator::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="spl.iterators.html">迭代器</a></li>
    <li>The RecursiveCachingIterator class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.recursivecachingiterator" class="reference">
 <h1 class="title">The RecursiveCachingIterator class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p>
 

  <div class="section" id="recursivecachingiterator.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    ...
   </p>
  </div>

 
  <div class="section" id="recursivecachingiterator.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">RecursiveCachingIterator</strong>
     </span>

     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.cachingiterator.html" class="classname">CachingIterator</a>
     </span>

     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.recursiveiterator.html" class="interfacename">RecursiveIterator</a></span> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.cachingiterator.html#cachingiterator.constants.call-tostring"><var class="varname">CachingIterator::CALL_TOSTRING</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.cachingiterator.html#cachingiterator.constants.catch-get-child"><var class="varname">CachingIterator::CATCH_GET_CHILD</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.cachingiterator.html#cachingiterator.constants.tostring-use-key"><var class="varname">CachingIterator::TOSTRING_USE_KEY</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.cachingiterator.html#cachingiterator.constants.tostring-use-current"><var class="varname">CachingIterator::TOSTRING_USE_CURRENT</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.cachingiterator.html#cachingiterator.constants.tostring-use-inner"><var class="varname">CachingIterator::TOSTRING_USE_INNER</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.cachingiterator.html#cachingiterator.constants.full-cache"><var class="varname">CachingIterator::FULL_CACHE</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="recursivecachingiterator.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="class.iterator.html" class="type Iterator">Iterator</a></span> <code class="parameter">$iterator</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = RecursiveCachingIterator::CALL_TOSTRING</span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="recursivecachingiterator.getchildren.html" class="methodname">getChildren</a></span>(): <span class="type"><span class="type">?</span><span class="type"><a href="class.recursivecachingiterator.html" class="type RecursiveCachingIterator">RecursiveCachingIterator</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="recursivecachingiterator.haschildren.html" class="methodname">hasChildren</a></span>(): <span class="type">bool</span></div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.count.html" class="methodname">CachingIterator::count</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.current.html" class="methodname">CachingIterator::current</a></span>(): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.getcache.html" class="methodname">CachingIterator::getCache</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.getflags.html" class="methodname">CachingIterator::getFlags</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.getinneriterator.html" class="methodname">CachingIterator::getInnerIterator</a></span>(): <span class="type"><a href="class.iterator.html" class="type Iterator">Iterator</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.hasnext.html" class="methodname">CachingIterator::hasNext</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.key.html" class="methodname">CachingIterator::key</a></span>(): <span class="type"><span class="type scalar">scalar</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.next.html" class="methodname">CachingIterator::next</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.offsetexists.html" class="methodname">CachingIterator::offsetExists</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.offsetget.html" class="methodname">CachingIterator::offsetGet</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.offsetset.html" class="methodname">CachingIterator::offsetSet</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.offsetunset.html" class="methodname">CachingIterator::offsetUnset</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.rewind.html" class="methodname">CachingIterator::rewind</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.setflags.html" class="methodname">CachingIterator::setFlags</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.tostring.html" class="methodname">CachingIterator::__toString</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="cachingiterator.valid.html" class="methodname">CachingIterator::valid</a></span>(): <span class="type">bool</span></div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.current.html" class="methodname">IteratorIterator::current</a></span>(): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.getinneriterator.html" class="methodname">IteratorIterator::getInnerIterator</a></span>(): <span class="type"><span class="type">?</span><span class="type"><a href="class.iterator.html" class="type Iterator">Iterator</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.key.html" class="methodname">IteratorIterator::key</a></span>(): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.next.html" class="methodname">IteratorIterator::next</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.rewind.html" class="methodname">IteratorIterator::rewind</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="iteratoriterator.valid.html" class="methodname">IteratorIterator::valid</a></span>(): <span class="type">bool</span></div>

   }</div>
 
  </div>
 

 
 </div>
 
 
















 
<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="recursivecachingiterator.construct.html">RecursiveCachingIterator::__construct</a> — Construct</li><li><a href="recursivecachingiterator.getchildren.html">RecursiveCachingIterator::getChildren</a> — Return the inner iterator's children as a RecursiveCachingIterator</li><li><a href="recursivecachingiterator.haschildren.html">RecursiveCachingIterator::hasChildren</a> — Check whether the current element of the inner iterator has children</li></ul>
</div>
</div></div></body></html>